package org.kl.bf.entity;

import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 含审计信息的Entity基类.
 * 
 * @Author hqm
 * @CreateTime 2014-3-13 下午9:00:03
 */
@MappedSuperclass
public class AuditableEntity extends IdEntity {
	private static final long serialVersionUID = -7008461993893381625L;
	protected String createBy;
	protected String createMan;
	protected Timestamp createTime;
	@Excel(exportName = "备注")
	protected String remark;
	protected String createDept;
	protected String createDeptName;

	/**
	 * 创建的操作员的登录名.
	 */
	@Column(updatable = false)
	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	/**
	 * 创建时间.
	 */
	// 本属性只在save时有效,update时无效.
	@Column(updatable = false)
	// 设定JSON序列化时的日期格式
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+08:00")
	public Timestamp getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	/**
	 * 创建部门.
	 */
	// 本属性只在save时有效,update时无效.
	@Column(updatable = false)
	public String getCreateDept() {
		return createDept;
	}

	public void setCreateDept(String createDept) {
		this.createDept = createDept;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	// 本属性只在save时有效,update时无效.
	@Column(updatable = false)
	public String getCreateMan() {
		return createMan;
	}

	public void setCreateMan(String createMan) {
		this.createMan = createMan;
	}

	// 本属性只在save时有效,update时无效.
	@Column(updatable = false)
	public String getCreateDeptName() {
		return createDeptName;
	}

	public void setCreateDeptName(String createDeptName) {
		this.createDeptName = createDeptName;
	}

}
